<template>
  <div class="content-container" v-show="this.groupData.data && this.groupData.data.length">
    <div v-if="groupData.title" class="title">{{ groupData.title }}</div>
    <div class="item-list">
      <div
        ref="item"
        v-for="(item, index) in groupData.data"
        :key="index"
        class="con"
        :class="[{nav_foc: focArr[index]}]"
      >
        <img v-lazy="item.img.fhd" :key="item.img.fhd" class="bg" alt>
        <img
          src="../assets/images/imglist_w298/t_bg.png"
          :data-index="'tar_'+group + '_'+index"
          class="t_bg"
        >
        <div class="text">
          <div class="t_move">
            <my-marquee :active="focArr[index]" align="center">{{ item.name }}</my-marquee>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import myMarquee from "@/components/base/marquee/marquee";
export default {
  name: "ImgList",
  components: { myMarquee },
  props: {
    groupData: {
      type: Object,
      default: {}
    },
    focArr: {
      type: Array,
      default: []
    },
    group: {
      type: Number,
      default: 0
    }
  }
};
</script>

<style scoped lang="less">
.content-container {
  margin-left: -48px;
  margin-right: -48px;
  .title {
    margin-left: 48px;
    margin-top: 42px;
    margin-bottom: 35px;
    width: 500px;
    height: 36px;
    font-family: MicrosoftYaHei;
    font-size: 48px;
    font-weight: normal;
    font-stretch: normal;
    line-height: 36px;
    letter-spacing: 0px;
    color: #a8e7ff;
  }
  .item-list {
    display: flex;
    flex-shrink: 0;
    flex-wrap: wrap;
    .con {
      position: relative;
      width: 298px;
      margin-left: 48px;
      margin-bottom: 48px;
      height: 167px;
      background-color: #b7b7b7;
      border-radius: 8px;
    }
    .bg {
      width: 100%;
      border-radius: 8px;
    }
    .t_bg {
      position: absolute;
      width: 298px;
      height: 40px;
      background-color: #000000;
      opacity: 0.7;
      bottom: 0;
      border-radius: 8px;
    }
    .text {
      position: absolute;
      width: 100%;
      bottom: 0;
      font-weight: normal;
      font-stretch: normal;
      text-align: center;
      color: #ffffff;
    }
    .t_move {
      width: 100%;
      height: 40px;
      line-height: 40px;
      font-size: 23px;
    }
    .nav_foc {
      border: 2px solid #ffffff;
      border-radius: 8px;
      transform: scale(1.1);
      -webkit-transform: scale(1.1);
    }
  }
}
</style>
